#include <stdio.h>
#include <string.h>

#define MAX_DIGITS 150

typedef struct Decimal
{
    unsigned char d[MAX_DIGITS];    /* 435 -> d[0]=5, d[1]=3, d[2]=4 */
    unsigned int  len;              /* number of digits; >= 1 */
    unsigned int  dp;               /* decimal point counting from right */
} Decimal;

/* Parse a string which contains only digits and at most one decimal point. */
int dec_parse(Decimal *result, const char *s)
{
    int len = (int)strlen(s);        
    int i, j = 0, dp = -1;
    for (i = len - 1; i >= 0; i--)
    {
        if (s[i] == '.' && dp == -1)
            dp = j;
        else if (s[i] >= '0' && s[i] <= '9')
            result->d[j++] = s[i] - '0';
        else
            return 0;
    }
    if (dp == -1)   /* no decimal point */
        dp = 0;
    if (j == 0)     /* no digit */
        return 0;

    /* Remove leading zeros */
    while (j > 0 && result->d[j-1] == 0)
        j--;

    if (j == 0) /* all zeros */
    {
        result->d[0] = 0;
        result->len = 1;
    }
    else
    {
        result->len = j;
    }
    result->dp = dp;
    return 1;
}

/* Format a string. Leading zeros before the decimal point are NOT trimmed. */
void dec_format(char *s, const Decimal *num)
{
    const unsigned char *r = num->d;
    int i, len = num->len, dp = num->dp;
    char *p = s;

    for (i = len - 1; i >= dp; i--) /* digits before the decimal point */
        *p++ = r[i] + '0';
    *p++ = '.';
    for (i = dp - 1; i >= 0; i--)   /* digits after the decimal point */
        *p++ = (i < len? r[i] : 0) + '0';

    while (p[-1] == '0')    /* remove trailing zeros */
        p--;
    if (p[-1] == '.')       /* remove trailing decimal point */
        p--;
    if (p == s)             /* all zeros */
        *p++ = '0';
    *p = '\0';
}

#if 0
/* Compute c = a + b. Note: this function doesn't check dp. */
void dec_add(Decimal *result, const Decimal *x, const Decimal *y)
{
    const unsigned char *a = x->d, *b = y->d;
    unsigned int na = x->len, nb = y->len;
    unsigned char *c = result->d;

    unsigned int i, carry = 0;
    for (i = 0; (i < na) || (i < nb); i++)
    {
        int s = (i < na ? a[i] : 0) + (i < nb ? b[i] : 0) + carry;
        if (carry = (s >= 10))
            s -= 10;
        c[i] = s;
    }
    if (carry)
        c[i++] = carry;
    result->len = i;
}
#endif

/* Compute result = x * y. */
void dec_mul(Decimal *result, const Decimal *x, const Decimal *y)
{
    const unsigned char *a = x->d, *b = y->d;
    unsigned int na = x->len, nb = y->len;
    unsigned char *c = result->d;
    unsigned int i, j;

    /* Initialize result to 0. */
    for (i = 0; i < na + nb; i++)
        c[i] = 0;

    /* Multiply each digit in a with the entire b, and add the result to c. */
    for (i = 0; i < na; i++)
    {
        int carry = 0;
        for (j = 0; j < nb; j++)
        {
            int s = a[i] * b[j] + c[i+j] + carry;
            carry = s / 10;
            s %= 10;
            c[i+j] = s;
        }
        if (carry)
            c[i+j] = carry;
    }
    result->len = (c[na+nb-1] == 0) ? na+nb-1 : na+nb;
    result->dp = x->dp + y->dp;
}

/* Compute c = a ^ b for b >= 0. */
void dec_exp(Decimal *result, const Decimal *a, unsigned int b)
{
    Decimal tmp, power = *a;
    dec_parse(result, "1");
    while (b)
    {
        if (b & 1)
        {
            tmp = *result;
            dec_mul(result, &tmp, &power);
        }
        if (b >>= 1)
        {
            tmp = power;
            dec_mul(&power, &tmp, &tmp);
        }
    }
}

int main()
{
    char s[MAX_DIGITS+10];
    int k;
    while (scanf("%s %d", s, &k) == 2)
    {
        Decimal x, r;
        if (!dec_parse(&x, s))
            return 1;
        dec_exp(&r, &x, k);
        dec_format(s, &r);
        printf("%s\n", s);
    }
    return 0;
}